<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Stimulus360.Controllers.Ideas.NewIdeasListingViewModel>" %>

<%@ Import Namespace="Stimulus360.Models.Data" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <!-- Main Area Start -->
    <div class="main">
        <div class="contetTittle">
            <div class="floatLeft">
                <a href="javascript:void(0);" class="headerLabel"><span>New Ideas</span></a>
            </div>
            <div class="floatRight">
                <a href="/Ideas/New" class="headerLabelBtn"><span>
                    &nbsp; <%= Html.Image("submitIdeas.png", "Submit Ideas") %>
                    Submit Ideas</span></a>
            </div>
        </div>
        <div id="ideaListContainer">
            <%Html.RenderPartial("IdeasList", Model.Ideas); %>
        </div>
        <div class="pagerbg">
            <div id="pagerIdeaList" class="pager">
            </div>
        </div>
    </div>
    <!-- Main Area End -->
    <!-- Right Col Start -->
    <div class="rightCol">
        <%Html.RenderPartial("IdeaSearch"); %>
        <%Html.RenderPartial("IdeasTagCloud", Model.Categories); %>
        <%Html.RenderPartial("IdeaRSSTagCloud"); %>
    </div>
    <!-- Right Col Start -->

    <script type="text/javascript" language="javascript">
        $(document).ready(function() {
            var totalPages_Idea = "<%=Model.Ideas.TotalPages %>";
            if (totalPages_Idea == 1) {
                $(".pagerbg").hide();
            }
            var currentPage = "<%=Model.Ideas.PageIndex%>";
            $("#pagerIdeaList").pager({ pagenumber: currentPage, pagecount: totalPages_Idea, buttonClickCallback: PageClick_IdeaList });
        });
        PageClick_IdeaList = function(pageclickednuber) {
            var pageIndex = pageclickednuber;
            window.location = "/Ideas/Page/" + pageIndex.toString();
        }
    </script>

</asp:Content>
